home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000824-20010305 / 000150_news@columbia.edu _Thu Dec 28 15:12:34 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
  3.     by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id PAA20728
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Thu, 28 Dec 2000 15:12:34 -0500 (EST)
  5. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  6.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA26942
  7.     for <kermit.misc@watsun.cc.columbia.edu>; Thu, 28 Dec 2000 15:12:33 -0500 (EST)
  8. Received: (from news@localhost)
  9.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA26627
  10.     for kermit.misc@watsun.cc.columbia.edu; Thu, 28 Dec 2000 14:50:52 -0500 (EST)
  11. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  12. From: fdc@columbia.edu (Frank da Cruz)
  13. Subject: Re: A wish for the FTP-client
  14. Date: 28 Dec 2000 19:50:51 GMT
  15. Organization: Columbia University
  16. Message-ID: <92g5ir$q00$1@newsmaster.cc.columbia.edu>
  17. To: kermit.misc@columbia.edu
  18.  
  19. In article <92g302$65t$1@localhost.localdomain>,
  20. Igor Sobrado  <sobrado@string1.ciencias.uniovi.es> wrote:
  21. : I just have tried the FTP-client provided by the first alpha release
  22. : of C-Kermit 7.1.199 and I found a possible improvement to it.  I think
  23. : it should be possible to use the FTP-server MDTM command (a command
  24. : that shows the last modification time of a file) to recover in the
  25. : local copies the original date of the files retrieved.
  26. : Between the three dates provided by Unix (creation, modification and
  27. : last access) the modification time is probably the most important
  28. : time for the final users.
  29. : If this improvement is accepted, a requeriment that should be
  30. : considered is that some FTP-servers have y2k bugs yet and it can
  31. : affect to files modified after december 1999.
  32. I looked into this, and it would be easy enough to do, except for one
  33. thing: the lack of a critical API.  When you send MDTM <filename> to
  34. the server, it sends back a string like this:
  35.  
  36.   20001228143521
  37.  
  38. representing 28 December 2000 14:35:21 (UTC/GMT).  It is quite easy to
  39. convert this to a struct tm.  But to change a file's date (with utime()
  40. or utimes()) requires a time_t, not a struct tm.  How do you convert a
  41. struct tm to a time_t in a reliable way? -- i.e. without writing code to
  42. count days, months, years, leap years, leap seconds, and all the rest,
  43. taking each machine's architecture into account.  I'm sure I must have
  44. overlooked something obvious -- feel free to embarrass me.
  45.  
  46. - Frank